package cn.tour.service;

import java.util.ArrayList;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.tour.dao.UserMapper;
import cn.tour.pojo.Platform_User;
@Service
public class UserServiceImpl implements UserService {

	@Resource
	private UserMapper userMapper;
	@Override
	public boolean userAdd(Platform_User user) {
		boolean flat=false;
		int result=0;
		try {
			result=userMapper.userAdd(user);
			if(result>0) {
				flat=true;
				System.out.println("注册或添加用户成功！");
			}else {
				System.out.println("注册或添加用户失败！");
			}
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		return flat;
	}
	@Override
	public Platform_User getPhone(String user_Phone) {
		Platform_User user=new Platform_User();
		try {
			user=userMapper.getPhone(user_Phone);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
		return user;
	}

}
